/**
 * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.policy.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.core.mp.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 实体类
 *
 * @author Blade
 * @since 2022-07-14
 */
@Data
@TableName("blade_policy")
@EqualsAndHashCode(callSuper = true)
public class Policy extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 发文字号
     */
    private String athletsNum;
    /**
     * 政策标题
     */
    private String policyName;
    /**
     * 录入部门id
     */
	@JsonSerialize(using = ToStringSerializer.class)
    private Long deptId;
    /**
     * 录入部门名称
     */
    private String deptName;

    /**
     * 发文日期
     */
	@DateTimeFormat(
		pattern = "yyyy-MM-dd"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd"
	)
    private Date athletsDate;

    /**
     * 政策类型
     */
    private String policyType;

    /**
     * 发布日期
     */
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Date publishTime;

    /**
     * 发布状态
     */
    private Integer publishStatus;

    /**
     * 实施时间
     */
	@DateTimeFormat(
		pattern = "yyyy-MM-dd"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd"
	)
	private Date startTime;

    /**
     * 解释
     */
    private String reason;
    /**
     * 正文
     */
    private String policyTermsContent;
    /**
     * 发文层级
     */
	@JsonSerialize(using = ToStringSerializer.class)
    private Long athletsLevelId;
    /**
     * 发文机关
     */
    private String athletsOrg;
    /**
     * 发文机关id
     */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long athletsOrgId;
    /**
     * 发文机关名称
     */
    private String athletsOrgName;
    /**
     * 适用地区id
     */
//	@JsonSerialize(using = ToStringSerializer.class)
	private String levelId;
    /**
     * 使用地区名称
     */
    private String levelName;
    /**
     * 申报时效类型
     */
    private Integer declareType;

    /**
     * 结束日期
     */
	private String endTime;


    /**
     * 附件
     */
	private String files;

	/**
	 * 点击数量
	 */
	private Integer viewCount;

	/**
	 * 关联事项
	 */
	@TableField(exist = false)
	private String matMatterList;


}
